Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid undefref error in validation.jl #1523

Merged
merged 1 commit into from
Jun 7, 2024
Merged

Conversation

vchuravy
Copy link
Member

@vchuravy vchuravy commented Jun 7, 2024

No description provided.

@vchuravy
Copy link
Member Author

vchuravy commented Jun 7, 2024

Otherwise:

UndefVarError: `libcuda` not defined
Stack trace

Here is what happened, the most recent locations are first:

    check_ir!(job::GPUCompiler.CompilerJob{Enzyme.Compiler.EnzymeTarget, Enzyme.Compiler.EnzymeCompilerParams}, errors::Vector{Tuple{String, Vector{Base.StackTraces.StackFrame}, Any}}, imported::Set{String}, inst::LLVM.CallInst, calls::Vector{Any}) @ validation.jl:430
    check_ir!(job::GPUCompiler.CompilerJob{Enzyme.Compiler.EnzymeTarget, Enzyme.Compiler.EnzymeCompilerParams}, errors::Vector{Tuple{String, Vector{Base.StackTraces.StackFrame}, Any}}, imported::Set{String}, f::LLVM.Function) @ validation.jl:323
    check_ir!(job::GPUCompiler.CompilerJob{Enzyme.Compiler.EnzymeTarget, Enzyme.Compiler.EnzymeCompilerParams}, errors::Vector{Tuple{String, Vector{Base.StackTraces.StackFrame}, Any}}, mod::LLVM.Module) @ validation.jl:293
    check_ir @ validation.jl:157
    codegen(output::Symbol, job::GPUCompiler.CompilerJob{Enzyme.Compiler.EnzymeTarget, Enzyme.Compiler.EnzymeCompilerParams}; libraries::Bool, deferred_codegen::Bool, optimize::Bool, toplevel::Bool, strip::Bool, validate::Bool, only_entry::Bool, parent_job::Nothing) @ compiler.jl:4631
    codegen @ compiler.jl:4592
    _thunk(job::GPUCompiler.CompilerJob{Enzyme.Compiler.EnzymeTarget, Enzyme.Compiler.EnzymeCompilerParams}, postopt::Bool) @ compiler.jl:5968
    _thunk @ compiler.jl:5968
    cached_compilation @ compiler.jl:6006
    (::Enzyme.Compiler.var"#1222#1223"{DataType, DataType, Enzyme.API.CDerivativeMode, Tuple{Bool, Bool}, Int64, Bool, Bool, UInt64, DataType})(ctx::LLVM.Context) @ compiler.jl:6073
    JuliaContext(f::Enzyme.Compiler.var"#1222#1223"{DataType, DataType, Enzyme.API.CDerivativeMode, Tuple{Bool, Bool}, Int64, Bool, Bool, UInt64, DataType}; kwargs::@Kwargs{}) @ driver.jl:52
    JuliaContext(f::Function) @ driver.jl:42
    #s1967#1221 @ compiler.jl:6024
    var"#s1967#1221"(FA::Any, A::Any, TT::Any, Mode::Any, ModifiedBetween::Any, width::Any, ReturnPrimal::Any, ShadowInit::Any, World::Any, ABI::Any, ::Any, ::Type, ::Type, ::Type, tt::Any, ::Type, ::Type, ::Type, ::Type, ::Type, ::Any) @ 
    (::Core.GeneratedFunctionStub)(::UInt64, ::LineNumberNode, ::Any, ::Vararg{Any}) @ boot.jl:602
    autodiff @ Enzyme.jl:234
    autodiff(mode::EnzymeCore.ReverseMode{true, EnzymeCore.FFIABI, false}, f::typeof(Main.var"workspace#7".final_energy!), ::Type{EnzymeCore.Active}, args::EnzymeCore.Duplicated{Main.var"workspace#7".Burgers}) @ Enzyme.jl:303
    [This cell: line 3](https://dj4earth.github.io/MPE24/Burgers_tutorial/burgers_tutorial.html#f152117a-578c-451f-86ce-4acd1a669bfd)

Copy link
Contributor

github-actions bot commented Jun 7, 2024

Benchmark Results

main 6bc50c7... main/6bc50c78679b00...
basics/overhead 4.03 ± 0.001 ns 4.03 ± 0.001 ns 1
time_to_load 0.346 ± 0.0018 s 0.346 ± 0.0023 s 0.999

Benchmark Plots

A plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR.
Go to "Actions"->"Benchmark a pull request"->[the most recent run]->"Artifacts" (at the bottom).

@vchuravy vchuravy merged commit 90fdd2e into main Jun 7, 2024
37 of 48 checks passed
@vchuravy vchuravy deleted the vc/avoid_undefined_gref branch June 7, 2024 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant